create external table if not exists jms_dm.dm_waybill_collect_intime_diagnostic_summary(
         taking_date                          string   comment '揽收日期'
        ,receive_network_code                string   comment '收件网点code'
        ,receive_network_name                string   comment '收件网点名称'
        ,receive_franchisee_code             string   comment '收件加盟商code'
        ,receive_franchisee                  string   comment '收件加盟商名称'
        ,receive_proxy_code                  string   comment '收件代理区code'
        ,receive_proxy                       string   comment '收件代理区名称'
        ,collect_code                        string   comment '交件集散code'
        ,collect_name                        string   comment '交件集散名称'
        ,center_code                         string   comment '交件中心code'
        ,center_name                         string   comment '交件中心名称'
        ,actual_network_shipment_no          string   comment '网点发件任务单'
        ,taking_user_code                    string   comment '揽收业务员code'
        ,taking_user_name                    string   comment '揽收业务员名称'
        ,customer_code                       string   comment '客户code'
        ,customer_name                       string   comment '客户名称'
        ,type                                string   comment '类型,0:应交件1:无三段码2:无路由3:错发4规划问题5正常6其他'
        ,is_over                             string   comment '应交件责任标识 1准点 2集散责任 0网点责任'
        ,should_hand_over_num                bigint   COMMENT '应交件票数'
        ,hand_over_in_time_num               bigint   COMMENT '准点交件票数'
        ,hand_over_not_in_time_num           bigint   COMMENT '不准点交件票数'
        ,hand_over_network_resp_num          bigint   COMMENT '交接网点责任票数'
        ,hand_over_collect_resp_num          bigint   COMMENT '交接集散责任票数'
        ,collect_arr_late_cnt                bigint   COMMENT '到集散不准点票数'
        ,center_arr_late_cnt                 bigint   COMMENT '到中心不准点票数'
        ,interrupted_taking_cnt              bigint   COMMENT '截单后揽收量'
        ,taking_no_send_cnt                  bigint   COMMENT '有揽未发量'
        ,network_send_late_cnt               bigint   COMMENT '网点发车晚量'
        ,network_collect_transport_late_cnt  bigint   COMMENT '网点集散运输晚数量'
        ,network_center_transport_late_cnt   bigint   COMMENT '网点中心运输晚数量'
        ,collect_send_late_cnt               bigint   COMMENT '集散发车晚数量'
        ,collect_center_transport_late_cnt   bigint   COMMENT '集散中心运输晚数量'
        ,center_send_timely_cnt              bigint   COMMENT '交件晚点及时发出量'
        ,center_send_late_cnt                bigint   COMMENT '交件晚点未及时发出量'
        ,false_taking_cnt                    bigint   COMMENT '虚假揽收数量'
        ,area_code                           string   COMMENT '收件底层片区CODE'
        ,area_name                           string   COMMENT '收件底层片区名称'
        ,zone_code                           string   COMMENT '市场片区CODE'
        ,zone_name                           string   COMMENT '市场片区名称'
        ,network_taking_cnt                  bigint   comment '网点揽收数量'
        ,network_send_cnt                    bigint   comment '网点发件数量'
        ,collect_arr_cnt                     bigint   comment '集散到件数量'
        ,collect_send_cnt                    bigint   comment '集散到件数量'
        ,center_arr_cnt                      bigint   comment '中心到件数量'
        ,center_send_cnt                     bigint   comment '中心发件数量'
        ,order_source                        string   COMMENT '订单来源'
)comment '经营指标-交件诊断汇总'
partitioned by (dt string comment '分区日期')
stored as parquet
location '/dw/hive/jms_dm.db/external/dm_waybill_collect_intime_diagnostic_summary'
tblproperties (
  'discover.partitions'='false',
  'parquet.column.index.access'='true'
);
